﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.BasicDataModule.Models.Schools.CreateOrEditSchoolModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Pages_BasicDataModule_Classrooms_Edit") + ": " + Model.School.SchoolName) : L("Pages_BasicDataModule_Classrooms_Create")))
    <div class="modal-body">
        <form name="ObjectForm" role="form" novalidate class="form-validation">
            <input type="hidden" name="ParentId" value="@Model.School.ParentId" />
            @if (Model.IsEditMode)
            {
                <input type="hidden" name="Id" value="@Model.School.Id" />
            }
            <div class="container-fluid">
                <div class="row">
                    <div class="col-xs-6">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <label>@L("Pages_BasicDataModule_Schools_Type")</label>
                            
                            <input id="OrgType01" name="OrgType" type="radio" value="1" @Html.Raw(Model.School.OrgType == 1 ? "checked=\"checked\"" : "") />学校
                            <input id="OrgType02" name="OrgType" type="radio" value="2" @Html.Raw(Model.School.OrgType == 2 ? "checked=\"checked\"" : "") />部门

                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-6">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <input type="text" name="SchoolName" value="@Model.School.SchoolName" class="form-control edited" required maxlength="@School.MaxNameLength" />
                            <label>@L("Pages_BasicDataModule_Schools_Name")</label>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            @Html.DropDownList("FunctionId", Model.GetDeptFunctionList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                            <label>@L("Pages_BasicDataModule_Schools_Function")</label>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <input type="text" name="Manager" value="@Model.School.Manager" class="form-control edited" maxlength="@School.MaxManagerLength" />
                            <label>@L("Pages_BasicDataModule_Schools_Manager")</label>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <input type="text" name="OfficePhone" value="@Model.School.OfficePhone" class="form-control edited" maxlength="20" />
                            <label>@L("Pages_BasicDataModule_Schools_Telephone")</label>
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <input type="text" name="Address" value="@Model.School.Address" class="form-control edited" required maxlength="@School.MaxAddressLength" />
                            <label>@L("Pages_BasicDataModule_Schools_Address")</label>
                        </div>
                    </div>
                </div>
               
            </div>
        </form>
    </div>

    @Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")
